import BaseCURDApi from '@/framework/infra/base/BaseCURDApi'

class BannerApi extends BaseCURDApi {
  constructor() {
    super('banner')
  }

  online = (id) => this.request.post(this.absUrl('online'), { id })
  offline = (id) => this.request.post(this.absUrl('offline'), { id })
  batchOffline = (ids) => this.request.post(this.absUrl('batch-offline'), { ids })
  batchOnline = (ids) => this.request.post(this.absUrl('batch-online'), { ids })
}

export const bannerApi = new BannerApi()
